Skip to content

Fix rand_range32() for umax = UINT32_MAX #9416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 24, 2022
Merged

Conversation

TimWolla
Copy link
Member

This was introduced in the commit that added the random extension:
4d8dd8d.

Resolves GH-9415

This was introduced in the commit that added the random extension:
4d8dd8d.

Resolves phpGH-9415
Copy link
Contributor

@zeriyoshi zeriyoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Embarrassing mistake. Thanks for the proper fix!
LGTM

Copy link
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Looks good to me, except perhaps for the test case.

@cmb69
Copy link
Member

cmb69 commented Aug 24, 2022

OT, but since I've just noticed this: we need to address https://github.com/php/php-src/runs/7992692944?check_suite_focus=true#step:5:9.

PS: #9417

@TimWolla
Copy link
Member Author

OT, but since I've just noticed this: we need to address https://github.com/php/php-src/runs/7992692944?check_suite_focus=true#step:5:9.

Yes, I noticed that also. Is this caused by an update of libxml in homebrew?

@cmb69
Copy link
Member

cmb69 commented Aug 24, 2022

Is this caused by an update of libxml in homebrew?

Apparently. xmlRelaxNGCleanupTypes() is deprecated as of libxml 2.10.0 (latest version; released just a few days ago).

@TimWolla TimWolla merged commit 0f696e2 into php:master Aug 24, 2022
@TimWolla TimWolla deleted the rand-range-32 branch August 24, 2022 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Randomizer::getInt(0, 2**32 - 1) with Mt19937 always returns 1
3 participants